package display;

import java.awt.Frame;
import java.awt.Graphics;
import java.awt.image.BufferStrategy;
import physics.body.Shape;
import java.util.ArrayList;
import javax.swing.JComponent;

/**
 *
 * @author peter
 */
public class Display extends JComponent {
	ArrayList<Shape> shapes;
	BufferStrategy bf;

	Display()
	{
		this(new ArrayList<Shape>());

	}

	Display(ArrayList<Shape> shapes)
	{
		this.shapes = shapes;
		setIgnoreRepaint(true);
	}

	@Override
	public void paintComponent(Graphics g)
	{
		super.paintComponents(g);
		System.out.println(shapes.size());
//		for (Shape s : shapes) {
//			s.draw(g);
//		}
	}

	public void setShapes(ArrayList<Shape> sa)
	{
		shapes = sa;
	}
}
